package priv.yiyuan.example.design.wrapper;

/**
 * 支付功能装饰器
 * <p>
 * 装饰器模式-抽象装饰器
 *
 * @author YiYuan
 * @data 2025/9/2
 * @apoNote
 */
public class PaymentDecorator implements PaymentStrategy {

    protected PaymentStrategy decoratedPayment;

    public PaymentDecorator(PaymentStrategy decoratedPayment) {
        this.decoratedPayment = decoratedPayment;
    }

    @Override
    public void pay(double amount) {
        decoratedPayment.pay(amount);
    }

    @Override
    public String getDescription() {
        return decoratedPayment.getDescription();
    }
}
